package com.zrwl.poscloud.core.restapi.admin.authority;

import com.zrwl.poscloud.commons.feign.ProxyFeignClient;
import com.zrwl.poscloud.commons.utils.ResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 刘思童
 * @create 2021/5/31 16:08
 **/
@RestController
@RequestMapping("/weixinUser")
@Api(value = "微信用户相关接口", tags = {"微信用户相关接口"})
@Slf4j
public class WeixinUserRestApi {

    @Resource
    private ProxyFeignClient proxyFeignClient;


    @ApiOperation(value = "获取AccessToken", notes = "获取AccessToken")
    @PostMapping("/getAccessToken")
    public String getAccessToken() {
        // 参数校验
        return ResultUtil.successWithData(proxyFeignClient.getAccessToken());
    }
}
